<?php
require_once("includes/session.inc.php");

if(isset($_POST['submit'])){
	$food = $_POST['food'];
	$wood = $_POST['wood'];
	$fer = $_POST['fer'];
	$pierre = $_POST['pierre'];
	$or = $_POST['or'];
	$ha = $_POST['ha'];
	//if($ha>250000)$ha=250000;
	$query  = "UPDATE nm_royaume SET nmr_food=$food, nmr_wood=$wood, nmr_fer=$fer, nmr_gold=$or, nmr_pierre=$pierre, nmr_ha=$ha WHERE nmr_id=$nmid";
	$result = lnmQuery($query);
}

$corps .= '<form action="beta.php" method="post"><br />';
$corps .= 'Nourriture : <input type="text" name="food" value="'.$royaume->nbNr.'"/><br />';
$corps .= 'Bois : <input type="text" name="wood" value="'.$royaume->nbBs.'"/><br />';
$corps .= 'Fer : <input type="text" name="fer" value="'.$royaume->nbFr.'"/><br />';
$corps .= 'Pierre : <input type="text" name="pierre" value="'.$royaume->nbPr.'"/><br />';
$corps .= 'Or : <input type="text" name="or" value="'.$royaume->nbOr.'"/><br />';
$corps .= 'Hectares : <input type="text" name="ha" value="'.$royaume->nbHa.'"/><br />';
$corps .= '<input type="hidden" name="submit" value="'.$nmid.'"/><br />';
$corps .= '<input class="bouton" type="submit" name="submit" value="OK" />';
$corps .= '</form>';

affiche_page($PAGE,$menu,$corps);
?>